package org.mcflier.appuntamento.io.driver.db.interfaces;

import java.util.List;

import org.mcflier.appuntamento.i18n.Language;
import org.mcflier.appuntamento.io.exception.JDBCConnectionException;
import org.mcflier.appuntamento.io.exception.JDBCStatementException;
import org.mcflier.appuntamento.io.exception.JDBCTransactionException;

public interface IJDBCLanguageDriver {

	public boolean addLanguage(Language language, boolean useTransaction) throws JDBCTransactionException, JDBCStatementException, JDBCConnectionException;
	
	public int addLanguages(List<Language> languages) throws JDBCTransactionException, JDBCStatementException, JDBCConnectionException; 
	
	public boolean existsLanguage(String code) throws JDBCStatementException, JDBCConnectionException;
	
	//Return a list with the stored Languages' id
	public List<String> existLanguages(List<String> codes) throws JDBCStatementException, JDBCConnectionException;
	
	public Language getLanguage(String code) throws JDBCStatementException, JDBCConnectionException;
	
	public boolean deleteLanguage(String code, boolean useTransaction) throws JDBCTransactionException, JDBCStatementException, JDBCConnectionException;
}
